package com.yum.ms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yum.ms.entity.Order;
import com.yum.ms.entity.User;
import com.yum.ms.entity.vo.GoodsVO;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Yum
 * @since 2022-02-16
 */
public interface IOrderService extends IService<Order> {

    /**
     * 秒杀
     * @param user
     * @param goodsVO
     * @return
     */
    Order seckill(User user, GoodsVO goodsVO);

    /**
     * 获取秒杀地址
     * @param userId
     * @param goodsId
     * @return
     */
    String createPath(Long userId, Long goodsId);

    /**
     * 校验秒杀地址
     * @param user
     * @param goodsId
     * @return
     */
    boolean checkPath(String path,User user, Long goodsId);

}
